home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
brent_cc.lha
/
brent_cc
/
vzeroin.dat
< prev
next >
Wrap
Text File
|
1993-08-08
|
673b
|
27 lines
-------------------------------------------------------------------------------
Testing the Brent's root finder
For function x^3 - 2*x - 5,
the root over [2,3] is 2.094551482e+00
Function value at the root found -1.7764e-15
No. of iterations 10
Exact root is 2.0945514815
For function cos(x)-x,
the root over [2,3] is 2.000000000e+00
Function value at the root found -2.4161e+00
No. of iterations 51
For function cos(x)-x,
the root over [-1,3] is 7.390851332e-01
Function value at the root found -5.1283e-17
No. of iterations 11
For function sin(x)-x,
the root over [-1,3] is -4.906842729e-12
Function value at the root found 0.0000e+00
No. of iterations 70